<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>用户列表</title>
</head>
<body>
{% load my_tags %}
<div>
    <a class="btn btn-success btn-sm" style="margin: 3px" href="{% reverse_url request 'customer_add' %}"> <i
            class="fa fa-plus-square"></i> 添加 </a>

</div>
<form action="" method="get" class="form-inline pull-right">
    <input type="text" name="query" class="form-control">
    <button class="btn btn-sm btn-primary">搜索</button>

</form>
<form action="" method="post" class="form-inline">
    {% csrf_token %}
    {#    <select name="action" id="" class="form-control">#}
    {#        <option value="multi_del"> 批量删除</option>#}
    {#    </select>#}
    {#    <button class="btn btn-sm btn-primary">提交</button>#}
    <table class="table table-bordered table-hover">
        <thead>
        <tr>
            <th>选择</th>
            <th>序号</th>
            <th>qq</th>
            <th>姓名</th>
            <th>性别</th>
            <th>生日</th>
            <th>电话</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        {% for customer in all_customer %}

            <tr>
                <td>
                    <input type="checkbox" name="ids" value="{{ customer.pk }}">
                </td>
                <td>{{ forloop.counter }}</td>
                <td>{{ customer.qq }}</td>
                <td>{{ customer.name|default:'未填写' }}</td>
                <td>{{ customer.get_sex_display }}</td>
                <td>{{ customer.birthday|default:'未填写' }}</td>
                <td>{{ customer.phone }}</td>
                <td>
                    <a href="{% reverse_url request 'customer_edit' customer.pk %}">编辑<i
                            class="fa fa-pencil-square-o"></i></a>
{#                    <button class="btn btn-sm btn-primary">删除</button>#}
                </td>
            </tr>

        {% endfor %}
        </tbody>
    </table>
</form>
</body>
</html>